#pragma once
#include "devio.hpp"
#include "drv_gpio.h"

#define FOREARM_A_PIN        GET_PIN(G, 0)
#define FOREARM_B_PIN        GET_PIN(G, 1)
#define BACKARM_A_PIN        GET_PIN(G, 2)
#define BACKARM_B_PIN        GET_PIN(G, 3)


class forearmA: private robot_devio
{
public:
    static forearmA& instance();
    rt_sem_t get_sem();
private:
    forearmA(rt_base_t pin_n, robot_devio::Direct dir):\
        robot_devio(pin_n, dir){};

    static forearmA* p;
};


class forearmB: private robot_devio
{
public:
    static forearmB& instance();
    rt_sem_t get_sem();
private:
    forearmB(rt_base_t pin_n, robot_devio::Direct dir):\
        robot_devio(pin_n, dir){};

    static forearmB* p;
};

class backarmA: private robot_devio
{
public:
    static backarmA& instance();
    rt_sem_t get_sem();
private:
    backarmA(rt_base_t pin_n, robot_devio::Direct dir):\
        robot_devio(pin_n, dir){};

    static backarmA* p;
};

class backarmB: private robot_devio
{
public:
    static backarmB& instance();
    rt_sem_t get_sem();
private:
    backarmB(rt_base_t pin_n, robot_devio::Direct dir):\
        robot_devio(pin_n, dir){};

    static backarmB* p;
};